-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove setpoints and wind condition specifics from calculate_XX_plane methods #868
Remove setpoints and wind condition specifics from calculate_XX_plane methods #868
Conversation
…otor_diameters field on fmodel.
What's the cause of this being slower? |
@rafmudaf , well, I'm not sure that it's slower, but I changed from exporting the existing |
I've now gone ahead and made the commensurate changes to |
Various methods used for visualization on
FlorisModel
(calculate_horizontal_plane()
,calculate_cross_plane()
, andcalculate_y_plane()
) still acceptedyaw_angles
as an input, but not other control setpoints.If
yaw_angles
were passed, they were applied; and ifyaw_angles
were not passed, the stored yaw angles were used (which could lead to findex length clashes, if thefmodel
hadn_findex
> 1).Simply removing
yaw_angles
as an input and allowing those that had already beenset
to be used could create a findex clash. Instead, I decided to:yaw_angles
as an inputwd
,ws
, andti
as inputsfindex
they would like to visualizeset_for_viz
; deepcopies offmodel
to get around issue with setpoints not being stored on the dictionary (which has come up a couple of times now---we may need a better fix for this issue).The result works, but may be somewhat slower than before. However, I'm not sure this is the path we'd like to go down, so I'd like some feedback here. If we are OK with this, I can also make some changes to simplify
calculate_horizontal_plane_with_turbines()
on flow_visualization.py. Once those changes are in, thecheck_wind_condition_for_viz()
method onFlorisModel
can likely be removed. For now, I've simply removed the erroneous type hints oncheck_wind_condition_for_viz()
.I'll also add some tests for all of this if we do want to go with this approach.